home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light
/
Light_Vol.1_August_1992_Datasphere_Publications_Disk_1_of_2_Side_A.d64
/
bitmap configure
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
3KB
|
76 lines
100 rem "---------------------------------------------------------------------"
110 def fn d(h)=h-48+7*(h>64)
120 poke 53280,11:poke 53281,12:print chr$(144)chr$(147)chr$(14)chr$(8)
130 print " [194]itmap [208]rinter configurator"
140 print " [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
150 print:print " [208]rogrammed by [199][207][207][211][197] [205]ay 1992"
160 print:print:print "[204]oading [194]itmap [208]rinter"
170 f$="@0:bitmap printer":for a=1 to 17:poke 679+a,asc(mid$(f$,a,1)):next a
180 poke 780,14:poke 781,171:poke 782,2:sys 65469:rem "[211][197][212][206][193][205]"
190 poke 780,0:poke 781,8:poke 782,0:sys 65466: rem "[211][197][212][204][198][211]"
200 poke 780,0:poke 781,1:poke 782,192:sys 65493: rem "[204][207][193][196]"
210 el=peek(781):eh=peek(782)
220 print:print "[208]rinter feed codes: ";:a=49997:c=4:gosub 430
230 print:print "[208]rinter setup code: ";:a=50130:gosub 400
240 print:print "[199]raphic line code: ";:a=50609:gosub 400
250 print:print "[194]itmap setup code: ";:a=51348:gosub 400
260 print:print "[194]itmap restore code: ";:a=51365:gosub 400
270 print:print "[211]aving [194]itmap [208]rinter"
280 poke 780,17:poke 781,168:poke 782,2:sys 65469: remclose"[211][197][212][206][193][205]"
290 poke 780,1:poke 781,8:poke 782,1:sys 65466: rem "[211][197][212][204][198][211]"
300 poke 251,1:poke 252,192
310 poke 780,251:poke 781,el:poke 782,eh:sys 65496: rem "[211][193][214][197]"
320 end
390 :
400 gosub 450:if d>16 then print:print "[212]oo many bytes in code":end
410 poke a,d:c=d
420 :
430 for b=1 to c:gosub 450:poke a+b,d:next b:print "data [207][203]":return
440 :
450 read h$:if left$(h$,1)<>"$" then d=val(h$):goto 470
460 h=asc(mid$(h$,2,1)):d=fn d(h)*16:h=asc(mid$(h$,3,1)):d=d+fn d(h)
470 if d>255 then print:print "[206]umber too large":end
480 return
490 :
500 rem "---------------------------------------------------------------------"
510 rem "[208]rinter feed codes"
520 :
530 data 13 :rem "[195]arriage [210]eturn"
540 data 0 :rem "[204]ine [198]eed (0 if not required)"
550 data $0b :rem "[214]ertical [212]ab"
560 data $0c :rem "[198]orm [198]eed"
590 :
600 rem "---------------------------------------------------------------------"
610 rem "[208]rinter setup code"
620 :
630 data 16 :rem "[206]umber of bytes in code"
640 data 13,13,13,13,13,13 :rem "[211]et top margin (6 line feeds)
650 [131] $1b,$40 :[143] "(NULL)eset printer"
660 [131] $1b,$4d :[143] "(NULL)et vallite pitch (12 cpi)
670 data $1b,$6c,$08 :rem "[211]et left margin (8 characters)
680 [131] $1b,$78,$01 :[143] "(NULL)et lenorrespondence (NULL)uality mode"
690 :
700 [143] "---------------------------------------------------------------------"
710 [143] "chr$raphic line code"
720 :
730 [131] 4 :[143] "(NULL)umber of bytes in code"
740 [131] $1b,$4c,$80,$02 :[143] "(NULL)et double density for 640 bytes"
790 :
800 [143] "---------------------------------------------------------------------"
810 [143] "peekitmap setup code"
820 :
830 [131] 13 :[143] "(NULL)umber of bytes in code"
840 [131] $1b,$7e,$30,$01 :[143] "(NULL)et 1/144 inch line spacing"
850 [131] $1b,$65,$01,$10 :[143] "(NULL)et fixed (NULL)(NULL)ab to 16 lines"
860 [131] $1b,$6c,$10 :[143] "(NULL)et left margin to centre bitmap"
870 [131] $0b,$0b :[143] "(NULL)(NULL)ab to position of bitmap"
890 :
900 [143] "---------------------------------------------------------------------"
910 [143] "peekitmap restore code"
920 :
930 [131] 7 :[143] "(NULL)umber of bytes in code"
940 [131] $0b,$0b :[143] "(NULL)(NULL)ab to position of footnote"
950 [131] $1b,$32 :[143] "(NULL)estore line spacing to 1/6 inch"
960 [131] $1b,$6c,$08 :[143] "(NULL)estore left margin to 8 char's"
990 :